<template>
    <div>

        <el-divider content-position="left">POST提交</el-divider>
        <el-row :space="20">
            <div v-for="(item,index) in rowPost" :key="index">
                <el-col :span="5">
                    {{ index }} : {{item instanceof Object ? JSON.stringify(item) : item }}
                </el-col>
            </div>
        </el-row>

        <el-divider content-position="left">GET提交</el-divider>
        <el-row :space="20">
            <el-col :span="5">
                <div v-for="(item,index) in rowGet" :key="index">
                    <el-col :span="5">
                        {{ index }} : {{item instanceof Object ? JSON.stringify(item) : item }}
                    </el-col>
                </div>
            </el-col>

        </el-row>


    </div>
</template>

<script>
    export default {
        name: 'table-expand',
        props: {
            row: Object
        },
        computed:{
            rowPost(){
                let post = this.row.post || '';
                if(post != '') {
                    return JSON.parse(post);
                }
                return {};
            },
            rowGet(){
                let get = this.row.get || '';
                if(get != '') {
                    return JSON.parse(get);
                }
                return {};
            }
        }
    }
</script>
<style scoped>

</style>
